package com.jeespring.concurrency.sigleton;

/**
 * 饿汉模式
 */
public class SigletonExample2 {

    // 私有构造函数
    private SigletonExample2(){

    }

    //单例对象
    private static SigletonExample2 instance = new SigletonExample2();

    //静态工厂方法
    public static SigletonExample2 getInstance(){
        return instance;
    }
}
